﻿using System.Collections.Generic;
using System.Linq;
using FLH.RegionDataValues;
using MyFloridaHouse.libSvDTO;

namespace MyFloridaHouse.DataAccess.ExtensionsTS
{
    public static class ConvertRegionDataValuesModelToRegionDataDTO
    {

        public static List<RegionDataDTO> convertList(List<RegionDataValuesModel> itemList)
        {
            return itemList.Select(item => ConvertRegionDataValuesModelToRegionDataDTO.DataContract(item)).ToList();
        }

        public static RegionDataDTO DataContract(RegionDataValuesModel item)
        {
            return new RegionDataDTO
            {
                regionID = item.RegionID,
                dictionaryID = item.DictionaryID,
                dataValue = item.DataValue,
                sourceLayerID = item.LayerID
            
            };
        }
    }
}

